import { Global, Module } from '@nestjs/common';
import { CommonService } from './common.service';
import { TypeOrmModule } from '@nestjs/typeorm';
import { PlatformData } from '@app/db/common/entities/PlatformData';
import { DictionaryCategory } from '@app/db/common/entities/DictionaryCategory';
import { DictionaryItem } from '@app/db/common/entities/DictionaryItem';
import { ScheduleModule } from '@nestjs/schedule';
import { ConfigureModule } from '@app/configure';
import { CacheModule } from '@app/cache';
import { CommonController } from './common.controller';

@Global()
@Module({
  imports : [ScheduleModule.forRoot(), TypeOrmModule.forFeature([PlatformData, DictionaryCategory, DictionaryItem], 'common'), ConfigureModule, CacheModule],
  providers: [CommonService],
  exports : [CommonService],
  controllers: [CommonController]
})
export class CommonModule {}
